borderopacity="1.0"
inkscape:pageopacity="1"
inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="224.5"
- inkscape:cy="258.5"
+ inkscape:zoom="16"
+ inkscape:cx="15.46875"
+ inkscape:cy="461.34375"
inkscape:document-units="px"
inkscape:current-layer="layer2"
showgrid="false"
d="m 82.95312,664.60753 2.41797,13.21094 3.23828,-2.39844 2.05469,2.64844 c 1.03125,1.43359 3.14844,-0.21094 2.01172,-1.5625 l -2.01562,-2.59375 2.98437,-2.17579 z m 0,0"
fill="#2e3436"
id="path2-35" /></g><g
+ transform="matrix(-1,0,0,1,196.0059,-35)"
+ inkscape:label="menu item check radio"
+ id="g4179-7-8"><title
+ id="title146367">ornament-dot-unchecked</title><rect
+ id="rect3246-4-6-5-6"
+ width="16"
+ height="16"
+ x="160"
+ y="487"
+ style="fill:none" /><path
+ d="m 168.00586,487 c -4.40435,0 -8,3.59563 -8,8 0,4.40433 3.59565,8 8,8 4.40433,0 8,-3.59567 8,-8 0,-4.40437 -3.59568,-8 -8,-8 z m 0,2 c 3.32155,0 6,2.6784 6,6 0,3.32154 -2.67846,6 -6,6 -3.32158,0 -6,-2.67845 -6,-6 0,-3.3216 2.67842,-6 6,-6 z"
+ id="path8781"
+ style="fill:#2e3435;fill-opacity:0.2" /></g><g
id="g13"
inkscape:label="window close exit"
transform="translate(-64,60)"><title
id="path10"
style="opacity:1;fill:#231e2d;fill-opacity:0.2;stroke-width:4;stroke-linecap:square;stroke-linejoin:round;stroke-dashoffset:2"
d="m 157.75,476 h 1.5 c 0.4155,0 0.75,0.3345 0.75,0.75 v 1.5 c 0,0.4155 -0.3345,0.75 -0.75,0.75 h -1.5 c -0.4155,0 -0.75,-0.3345 -0.75,-0.75 v -1.5 c 0,-0.4155 0.3345,-0.75 0.75,-0.75 z"
- sodipodi:nodetypes="sssssssss" /></g></g></svg>
+ sodipodi:nodetypes="sssssssss" /></g><g
+ transform="matrix(-1,0,0,1,216.0059,-35)"
+ inkscape:label="menu item check radio"
+ id="g12"><title
+ id="title10">ornament-check</title><rect
+ id="rect11"
+ width="16"
+ height="16"
+ x="160"
+ y="487"
+ style="fill:none" /><path
+ d="m 162.2479,491.66197 c -0.17578,-0.19922 -0.26171,-0.46094 -0.24609,-0.72657 0.0195,-0.26562 0.14063,-0.51172 0.33984,-0.6875 0.19922,-0.17578 0.46094,-0.26172 0.72657,-0.24609 0.26562,0.0195 0.51172,0.14062 0.6875,0.33984 l 6.29687,7.19532 2.24219,-2.24219 c 0.39062,-0.39063 1.02344,-0.39063 1.41406,0 0.1875,0.1875 0.29297,0.4414 0.29297,0.70703 0,0.26562 -0.10547,0.51953 -0.29297,0.70703 l -3,3 c -0.19531,0.19531 -0.46484,0.30469 -0.73828,0.29297 -0.27734,-0.008 -0.53906,-0.13281 -0.72266,-0.33984 z m 0,0"
+ fill="#2e3436"
+ id="path1-3" /></g><g
+ id="g21"
+ inkscape:label="menu item check radio"><title
+ id="title21">ornament-dot-checked</title><path
+ id="path9555"
+ d="m 8.006,457 c 1.65555,0 3,1.34444 3,3 0,1.65555 -1.34445,3 -3,3 -1.65555,0 -3,-1.34445 -3,-3 0,-1.65556 1.34445,-3 3,-3 z"
+ style="fill:#2e3436;fill-opacity:1"
+ sodipodi:nodetypes="sssss" /><path
+ id="path12"
+ d="m 8,452 c 4.40433,0 8,3.59566 8,8 0,4.40433 -3.59566,8 -8,8 -4.40434,0 -8,-3.59566 -8,-8 0,-4.40435 3.59566,-8 8,-8 z m 0,2 c -3.32157,0 -6,2.67843 -6,6 0,3.32156 2.67843,6 6,6 3.32156,0 6,-2.67844 6,-6 0,-3.32157 -2.67844,-6 -6,-6 z"
+ style="fill:#2e3435;fill-opacity:0.2"
+ sodipodi:nodetypes="ssssssssss" /><rect
+ id="rect19"
+ width="16"
+ height="16"
+ x="-16.005899"
+ y="452"
+ style="fill:none"
+ transform="scale(-1,1)" /></g></g></svg>
DOT: 1,
CHECK: 2,
HIDDEN: 3,
+ NO_DOT: 4,
};
function isPopupMenuItemVisible(child) {
this._ornament = ornament;
if (ornament === Ornament.DOT) {
- this._ornamentIcon.icon_name = 'ornament-dot-symbolic';
+ this._ornamentIcon.icon_name = 'ornament-dot-checked-symbolic';
this.add_accessible_state(Atk.StateType.CHECKED);
+ } else if (ornament === Ornament.NO_DOT) {
+ this._ornamentIcon.icon_name = 'ornament-dot-unchecked-symbolic';
+ this.remove_accessible_state(Atk.StateType.CHECKED);
} else if (ornament === Ornament.CHECK) {
this._ornamentIcon.icon_name = 'ornament-check-symbolic';
this.add_accessible_state(Atk.StateType.CHECKED);
}
_updateOrnamentStyle() {
- if (this._ornament !== Ornament.HIDDEN)
+ if (this._ornament === Ornament.CHECK || this._ornament === Ornament.NONE)
this.add_style_class_name('popup-ornamented-menu-item');
else
this.remove_style_class_name('popup-ornamented-menu-item');
_init(displayName, shortName) {
super._init();
- this.setOrnament(PopupMenu.Ornament.NONE);
+ this.setOrnament(PopupMenu.Ornament.NO_DOT);
this.label = new St.Label({
text: displayName,
let newSource = this._inputSourceManager.currentSource;
if (oldSource) {
- this._menuItems[oldSource.index].setOrnament(PopupMenu.Ornament.NONE);
+ this._menuItems[oldSource.index].setOrnament(PopupMenu.Ornament.NO_DOT);
this._indicatorLabels[oldSource.index].hide();
}
radioGroup.push(item);
item.radioGroup = radioGroup;
item.setOrnament(prop.get_state() === IBus.PropState.CHECKED
- ? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NONE);
+ ? PopupMenu.Ornament.DOT : PopupMenu.Ornament.NO_DOT);
item.connect('activate', () => {
if (item.prop.get_state() === IBus.PropState.CHECKED)
return;
ibusManager.activateProperty(
item.prop.get_key(), IBus.PropState.CHECKED);
} else {
- group[j].setOrnament(PopupMenu.Ornament.NONE);
+ group[j].setOrnament(PopupMenu.Ornament.NO_DOT);
group[j].prop.set_state(IBus.PropState.UNCHECKED);
ibusManager.activateProperty(
group[j].prop.get_key(), IBus.PropState.UNCHECKED);